﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Diagnostics;
using System.Collections;

static class StringExtension
{
    public static string Reverse(this string s)
    {
        var array = s.ToCharArray();
        Array.Reverse(array);
        return new String(array);
    }
}

public class HVector
{
    private int _x;

    public HVector(int number)
    {
        X = number;
    }

    public static HVector operator ++(HVector h)
    {
        return new HVector(h._x + 1); 
    }

    public override string  ToString()
    {
 	     return _x.ToString();
    }

    public static void print()
    {
        Console.WriteLine("PRINT OF HVECTOR");
    }

    public int X { get { return _x; } protected set { _x = value; } }
}

public class Child : HVector
{
    public Child(int n) : base(n)
    {
        X = 10;
        Console.WriteLine(X);
    }
}

abstract class Abstract
{
    protected int _x;

    public Abstract ( int n )
    { 
        _x = n; 
    }

    public int X
    {
        get { return _x; }
        private set { _x = value; }
    }

    public void SetVariable(int n)
    {
        this._x = n;
    }
}



class Math : Abstract
{
    public Math(int n)
        : base(n)
    {

    }

    public void Call()
    {
        Console.WriteLine(this.X);
    }
   
}



struct Mark
{
    int Math;
    public Mark(int n = 10)
    {
       Math = n;
    }

    public override string ToString()
    {
        return "Math: " + Math.ToString();
    } 
}

class Program
{
    static void Measure (String message, Action a)
    {
        var sw = new Stopwatch();
        sw.Start();
        a();
        sw.Stop();
        Console.WriteLine(message, sw.Elapsed);
    }

    static void Main(string[] args)
    {
        
    }

    static void PrintGCStats()
    {
        Console.WriteLine("Gen 0: {0}, Gen 1: {1}, Gen 2: {2}\n",
            GC.CollectionCount(1), GC.CollectionCount(2), GC.CollectionCount(3));
    }
    struct Point
    {
        private int _x;
        private int _y;

        static int cordinate;
        static Point()
        {
            Console.WriteLine("Static Point");
        }

        public static void Example()
        {

        }
        public Point( ref int x, ref int y)
        {
            _x = x;
            _y = y;
        }

        public override string ToString()
        {
            return "(" + _x + ", " + _y + ")";
        }
    }




   

  }

